var conn = require('./connect');
var judgelogin=async function(cook){
    let sql=`SELECT * FROM user WHERE sission='${cook}'`;
    return await new Promise(res=>{
        conn.connection1.query(sql,async function(err,result,files){
            if(err){
                console.log('[SELECT ERROR1111] - ', err.message);
                res(false);
                return;
            }
            console.log(result);
            if(result!=false){
                console.log("result84848",result[0]);
                res(result[0]);
            }else{
                res(false)
            }

        });
    })
}
module.exports = {
    judgelogin
};